/**
 * 文章预览页
 */
import React from "react";
import {Link} from "react-router";
import ArticleBody from "../components/article-body";
import {GOVERNMENT_APPROVAL_ID,BANK_HOSTING_ID,ENTERPRISES_BACKGROUND_ID} from "../consts";
import Tool from '../components/tool';
export default class Safe extends React.Component {
	constructor(...props) {
		super(...props);
		this.state = {
			active: GOVERNMENT_APPROVAL_ID
		};
	}

	componentDidMount() {
		Tool.setPageTitle('安全保障');
	}

	render() {
		return (
				<div className="pages site-news has-header has-footer">
					<div className="components site-header">
						<div onClick={()=>this.setState({active:GOVERNMENT_APPROVAL_ID})} className={this.state.active===GOVERNMENT_APPROVAL_ID?'active':null}>政府批文</div>
						<div onClick={()=>this.setState({active:ENTERPRISES_BACKGROUND_ID})} className={this.state.active===ENTERPRISES_BACKGROUND_ID?'active':null}>国企背景</div>
						<div onClick={()=>this.setState({active:BANK_HOSTING_ID})} className={this.state.active===BANK_HOSTING_ID?'active':null}>银行托管</div>
					</div>
					<ArticleBody id={this.state.active}/>
					<div className="components site-footer">
						<Link className="activity-introduce" to="/activity">活动介绍</Link>
						<Link className="join-activity" to="/shake">参与活动</Link>
					</div>
				</div>
		)
	}
}
Safe.contextTypes = {
	router: React.PropTypes.object.isRequired
};